para mtemp0
   if .not. impressora()
      retu(2)
   endif
   sele 100
   use temp
   legal(8,6,22,77,'Relatorio GPS - CONTADOR')
   mmes =  '  /    '
   @ 10,8 say 'Competencia :' get mmes pict '99/9999'
   read
   mtitulo = .t.
   mpagina = 1
   mtotal1 := mtotal2 := mtotal3 := 0
   sele temp          
   go top
   while .not. eof()
    if inss # mmes
       skip
       loop
    endif
    if cancela = 'S'
       skip
       loop
    endif
    set devi to screen
    @ 15,8 say 'Data        : ' + dtoc(emissao)
    set devi to printer
    if mtitulo
       tit_rela('RETENCAO GPS - CONTADOR -' + mtemp0 + mmes,mpagina)
       mtitulo = .f.
       @ prow(),0   say chr(15)
       @ prow()+1,0 say '                                                                       DATA DE    NOTA         VALOR       RETENCAO       VALOR APOS'
       @ prow()+1,0 say 'C.CUSTO CONTRATANTE                                                    EMISSAO  FISCAL         BRUTO       I.N.S.S.         RETENCAO'
       @ prow()+1,0 say repli('=',132)
       @ prow()+1,0 say ''
    endif
    mcliente = cliente
    sele clientes
    seek mcliente  
    mnome    = nome
    mcgc     = cgc
    mccusto  = ccusto
    sele temp          
    mretencao1 = acharetencao(1)
    mtotal    = total                   
    mliquido  = mtotal - mretencao1
    mtotal1+=mtotal
    mtotal2+=mretencao1
    mtotal3+=mliquido
    @ prow()+1,0  say trans(mccusto,'999999') + ' ' + mnome + '    ' + dtoc(emissao)
    @ prow(),80   say numero    pict '999999'
    @ prow(),88   say total     pict '9,999,999.99'
    @ prow(),103  say valorret1 pict '9,999,999.99'
    @ prow(),120  say mliquido  pict '9,999,999.99'
    if valetransp + valealimen + vmaterial # 0
       @ prow()+1,0 say ''
    endif
    if valetransp > 0
       @ prow(),0   say 'Vale-Transporte  : ' + trans(valetransp,'999,999.99')
    endif
    if valealimen > 0
       @ prow(),50  say 'Vale-Alimentacao : ' + trans(valealimen,'999,999.99')
    endif
    if vmaterial > 0
       @ prow(),100 say 'Material : ' + trans(vmaterial,'999,999.99')
    endif
    skip
    if prow() > 56
       eject
       mtitulo = .t.
       mpagina+=1
    endif
   enddo
   @ prow()+1,0  say repli('=',132)
   @ prow()+1,0  say 'TOTAl'                                       
   @ prow(),87   say mtotal1   pict '99,999,999.99'
   @ prow(),102  say mtotal2   pict '99,999,999.99'
   @ prow(),119  say mtotal3   pict '99,999,999.99'
   @ prow()+1,0  say repli('=',132)
   eject
   set devi to screen
   close temp
retu

